<?php
class HotkeyEditAction extends AdminAction
{
	public function __construct()
	{
		parent::__construct();
		$this->responseType = 'tpl';
		$this->layout = 'admin';
	}

	public function execute()
	{
		$hotkeyService	= new HotkeyService();
		$id				= $this->context->get('id');
		$cid			= $this->context->get('cid');
		if(is_numeric($id) && $id)
		{
			$info					= $hotkeyService->get($id);
			if($info)
			{
				$this->data['info']	= $info;
				$cid				= $info['category_id'];
			}
		}
		$this->data['id']				= $id;
		$this->data['category_id']		= $cid;
		
		$categoryService	= new CategoryService();
		$category			= $categoryService->get($cid);
		if($category)
		{
			$this->data['category']	= $category;
		}
		
		
		$this->data['menu']	= 'category';
	}
}
